library(housingData)housing$state <-as.character(housing$state)housing$county <-as.character(housing$county)slope_fn <-function(x, y)coef(lm(y ~ x))[2]d <-nest(housing, data =!one_of(c("county", "state")))d <- d %>%mutate(cogs =map(data, function(x, state, county) {tibble(slope =slope_fn(x$time, x$medListPriceSqft),mean_list =mean(x$medListPriceSqft, na.rm =TRUE),mean_sold =mean(x$medSoldPriceSqft, na.rm =TRUE),n_obs =length(which(!is.na(x$medListPriceSqft))) ) }),zillow_link =sprintf("http://www.zillow.com/homes/%s_rb/",gsub(" ", "-", paste(county, state))) ) %>%unnest(cogs) %>%filter(n_obs >1)d <- d %>%mutate(panel =map_plot(data, function(x) {plot_ly(data = x, x =~time, y =~medListPriceSqft,type ="scatter", mode ="markers") %>%layout(xaxis =list(title ="time"),yaxis =list(title ="median list price / sq ft")) }) )d %>%trelliscope(name ="list_vs_time",desc ="monthly median list price vs. time for 2984 US counties from 2008–2016",nrow =2, ncol =4, path ="nba1", self_contained =TRUE)
2 New Trelliscope
Then install the new version of trelliscope from this repo and follow it’s readme tutorial. Note that the graphical interface at the end won’t render but the code should al work up to that point. Make sure you’re not getting any errors and make sure your final table has all the necessary plots and what not.
New Version Tutorial
3 Vignettes
Clone this repo to your local machine. You will open vignettes in this repo one by one and follow their tutorials with the intent to suggest improvements in two ways; generallly, how could the writing be improved and specifically what changes need to be made to update the code and writing to align with new trelliscope? You will do this with the following trelliscopes in this order: Host a Trelliscope on Github, password_protecting, related displays, preserving_state_local.
Vignettes Improvement
4 Vignettes Comments
Add comments and suggestions for edits to the issues thread here (note that this is an issue in the trelliscope-vignettes repo)
Comments about Vignettes on GitHub Issue
5 Package Comments
Additionally, add comments on how the new trelliscope package could be improved from a user standpoint here
Comments about Trelliscope Package Improvements
biggest confusion is about the path, temporary file path, and getting the plots to render in the output
6 NBA Trelliscope
Build a trelliscope with data from this repo. Make it pretty. Try implementing some of the skills you’ve learned from the tutorials. Specifially, host the final trelliscope on github, password protect it, and use cognostoc groups. This trelliscope needs to be functional so build it using the old trelliscope package.